package 对象之封装.账号登录界面;
//登录账号界面

import java.util.Scanner;


public class text {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);


        while (true) {
            String username, password;
            System.out.println("请输入用户名：");
            username = sc.nextLine();
            username = username.toLowerCase();
            username = username.trim();
            System.out.println("请输入密码：");
            password = sc.nextLine();
            if (username.equals("admin") && password.equals("123456")) {
                System.out.println("登录成功");
                break;
            } else {
                System.out.println("账号或密码错");
            }
        }
    }
}
